package com.ft.admix.ad;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.bykv.vk.openvk.api.proto.Bridge;
import com.bykv.vk.openvk.api.proto.ValueSet;
import com.bytedance.sdk.openadsdk.TTFeedAd;
import com.bytedance.sdk.openadsdk.mediation.MediationConstant;
import com.bytedance.sdk.openadsdk.mediation.ad.MediationNativeAdAppInfo;
import com.bytedance.sdk.openadsdk.mediation.ad.MediationViewBinder;
import com.bytedance.sdk.openadsdk.mediation.bridge.MediationValueSetBuilder;
import com.bytedance.sdk.openadsdk.mediation.custom.MediationCustomNativeDislikeDialog;

import java.util.List;
import java.util.Map;

public class MixCustomNativeAd implements IMixCustomNativeAd {
    private double biddingPrice;
    private Map<String, Object> mediaExtraInfo;
    private String title;
    private String description;
    private String iconUrl;
    private String imageUrl;
    private int imageWidth;
    private int imageHeight;
    private String actionText;
    private String packageName;
    private int videoWidth;
    private int videoHeight;
    private double starRating;
    private List<String> imageList;
    private String source;
    private boolean isExpressAd;
    private int adImageMode;
    private int interactionType;
    private MixNativeAdAppInfo nativeAdAppInfo;
    private ViewGroup container;

    public MixCustomNativeAd() {
    }

    public void setBiddingPrice(double price) {
        this.biddingPrice = price;
    }

    public void setMediaExtraInfo(Map<String, Object> mediaInfo) {
        this.mediaExtraInfo = mediaInfo;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public void setImageWidth(int width) {
        this.imageWidth = width;
    }

    public void setImageHeight(int height) {
        this.imageHeight = height;
    }

    public void setActionText(String actionText) {
        this.actionText = actionText;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public void setVideoWidth(int width) {
        this.videoWidth = width;
    }

    public void setVideoHeight(int height) {
        this.videoHeight = height;
    }

    public void setStarRating(double rating) {
        this.starRating = rating;
    }

    public void setImageList(List<String> images) {
        this.imageList = images;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public void setExpressAd(boolean isExpress) {
        this.isExpressAd = isExpress;
    }

    public void setAdImageMode(int mode) {
        this.adImageMode = mode;
    }

    public void setInteractionType(int type) {
        this.interactionType = type;
    }

    public void setNativeAdAppInfo(MixNativeAdAppInfo appInfo) {
        this.nativeAdAppInfo = appInfo;
    }

    @Override
    public void render(ViewGroup viewGroup) {
        this.container = viewGroup;
    }

    @Override
    public View getExpressView(ViewGroup viewGroup) {
        return null;
    }

    public String getVideoUrl() {
        return null;
    }

    public boolean hasDislike() {
        return false;
    }

    public void onPause() {
    }

    public void onResume() {
    }

    public void onDestroy() {
    }

    public MediationConstant.AdIsReadyStatus isReadyCondition() {
        return MediationConstant.AdIsReadyStatus.ADN_NO_READY_API;
    }

    public int getBiddingType() {
        return 1;
    }

    public boolean isUseCustomVideo() {
        return false;
    }

    public void callAdClick() {
    }

    public void callAdShow() {
    }

    public void callRenderSuccess(float width, float height) {
    }

    public void callRenderFail(View view, int code, String msg) {
    }

    public void callVideoStart() {
    }

    public void callVideoPause() {
    }

    public void callVideoResume() {
    }

    public void callVideoCompleted() {
    }

    public void callVideoError(int code, String msg) {
    }

    public void callVideoProgressUpdate(long current, long duration) {
    }

    public void callOnIdle() {
    }

    public void callOnDownloadActive(long totalBytes, long currBytes) {
    }

    public void callOnDownloadPaused(long totalBytes, long currBytes, String fileName, String appName) {
    }

    public void callOnDownloadFailed(long totalBytes, long currBytes, String fileName, String appName) {
    }

    public void callOnDownloadFinished(long totalBytes, String fileName, String appName) {
    }

    public void callOnInstalled(String fileName, String appName) {
    }

    public void callDislikeShow() {
    }

    public void callDislikeCancel() {
    }

    public void callDislikeSelected(int position, String reason) {
    }

//    public void setDislikeDialogCallBack(MediationCustomNativeDislikeDialog callback) {
//        this.dislikeDialog = callback;
//    }

    public boolean isClientBidding() {
        return true;
    }

    public boolean isServerBidding() {
        return false;
    }

    public void registerView(@Nullable Activity activity, @Nullable ViewGroup container,
                             @Nullable List<View> clickViews, @Nullable List<View> creativeViews,
                             @Nullable List<View> customClickViews, @Nullable MediationViewBinder viewBinder) {
    }

    public void receiveBidResult(boolean isWin, double price, int lossReason, Map<String, Object> extraInfo) {
    }

    public View getVideoView() {
        return null;
    }
}
